package day1125;
//   打印： 1------------1000所有的完数
public class Demo4 {

    public static void main(String[] args) {
        int i=6;//循环控制i变量不断增加，到1000为止

        int  yz=1;//do-while
        int sum=0;//do-while
        do{//do-while
            if(i%yz==0){//do-while
                sum= sum+yz;//do-while
            }//do-while
            yz++;//do-while
        }while(yz<= i-1);//do-while
        if(sum == i){//do-while
            System.out.println(i+"是完数");//do-while
        }//do-while
        i++;//do-while

    }

}
